<html>

<head>
    @include('v1.common.meta')
    <link rel="stylesheet" href="{{elixir('css/basicdata.css')}}">
</head>

<body>

<div class="yjs-grid">
    <div class="yjs-grid-box">
        <div class="layui-tab">
            @if(Auth::check())
                <div class="layui-container">
                    <!-- 功能按钮区 -->
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <fieldset class="layui-elem-field">
                                <legend>操作功能区</legend>
                                <div class="layui-field-box">
                                    <div class="layui-row hidden-tips">
                                        <div class="layui-col-md12">
                                            <blockquote class="layui-elem-quote">
                                                温馨提示：存在"<i class="layui-icon">&#xe605;</i>"标识的列表项，可通过单元格编辑进行数据维护。
                                            </blockquote>
                                        </div>
                                    </div>

                                    <div class="layui-form layui-form-pane" name="majorForm"
                                         action="javascript:;" method="POST">
                                        <div class="layui-row">
                                            <div class="layui-col-md2">
                                                <div class="layui-inline yjs-col-separate">
                                                    <a class="layui-btn layui-btn-small"
                                                       data-type="addData">
                                                        <i class="yjs-icon">&#xe61c;</i> 新增
                                                    </a>
                                                </div>
                                                <div class="layui-inline yjs-col-separate">
                                                    <a class="layui-btn layui-btn-small layui-btn-danger"
                                                       data-type="deleteBatchData">
                                                        <i class="yjs-icon">&#xe610;</i> 删除
                                                    </a>
                                                </div>
                                            </div>
                                            <div class="layui-col-md2">
                                                <div class="layui-inline yjs-col-separate">
                                                    <a class="layui-btn layui-btn-small layui-btn-normal"
                                                       data-type="importMajors">
                                                        <i class="yjs-icon">&#xe670;</i> 导入
                                                    </a>
                                                </div>
                                                <div class="layui-inline yjs-col-separate">
                                                    <a class="layui-btn layui-btn-small layui-btn-warm"
                                                       data-type="exportMajors">
                                                        <i class="yjs-icon">&#xe617;</i> 导出
                                                    </a>
                                                </div>
                                            </div>
                                            <div class="layui-col-md4">
                                                {{--<div class="layui-inline yjs-col-separate">--}}
                                                    {{--<a class="layui-btn layui-btn-small layui-btn-normal"--}}
                                                       {{--data-type="printMajors">--}}
                                                        {{--<i class="yjs-icon">&#xe670;</i> 打印--}}
                                                    {{--</a>--}}
                                                {{--</div>--}}
                                                <div class="layui-inline yjs-col-separate">
                                                    <a class="layui-btn layui-btn-small layui-btn-warm"
                                                       data-type="downMajors">
                                                        <i class="yjs-icon">&#xe617;</i> 下载模版
                                                    </a>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="layui-row">
                                            <div class="layui-col-md4">
                                                <div class="layui-input-inline yjs-col-separate">
                                                    <select name="arrival_code" id="arrival_code" lay-filter="arrival_code" lay-search="">
                                                        <option value="">迎新代码</option>
                                                        @foreach($codes as $item)
                                                            @if($item == $arrival_code)
                                                                <option value="{{$item}}" selected>{{$item}}</option>
                                                            @else
                                                                <option value="{{$item}}">{{$item}}</option>
                                                            @endif
                                                        @endforeach
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </div>
                            </fieldset>
                        </div>
                    </div>
                    <!-- 数据显示区 -->
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <table class="layui-table" id="dataBody" lay-filter="majorList">
                            </table>
                        </div>
                    </div>
                </div>
            @else
                <div class="layui-container">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <blockquote class="layui-elem-quote-error">
                                友情提示：该功能只面向已成功登录系统，并具有相应权限的用户可用。
                            </blockquote>
                        </div>
                    </div>
                </div>
            @endif
        </div>
    </div>
</div>
@include('v1.common.js')
<script type="text/html" id="groupBtn">
    <div class="layui-btn-group">
        <a class="layui-btn layui-btn-mini" lay-event="viewData"><i class="yjs-icon">&#xe623;</i> 查看</a>
        <a class="layui-btn layui-btn-mini layui-btn-danger" lay-event="deleteData"><i class="yjs-icon">&#xe643;</i> 删除</a>
    </div>
</script>
<script src="{{elixir('js/major.js')}}"></script>
</body>
</html>





